package com.tensquare.search.dao;

import com.tensquare.search.pojo.Article;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

/**
 * 文章数据访问层接口
 * @author fangyu
 * @version v1.0.0
 * @date 2020/10/14 12:40 下午
 */
@Repository
public interface ArticleSearchRepository extends ElasticsearchRepository<Article, String> {

    /**
     * 检索
     * @param title
     * @param content
     * @param pageable
     * @return
     */
    public Page<Article> findByTitleOrContentLike(String title, String content, Pageable pageable);
}
